﻿#ifndef MEMBERDIALOG_H
#define MEMBERDIALOG_H

#include <QDialog>
#include <QColor>
#include <QAbstractButton>
#include <QTableWidget>
#include "datapre.h"
#include <set>
#include "common.h"
#include<QCloseEvent>



namespace Ui{
    class MemberDialog;
}

class MemberDialog : public QDialog
{
    Q_OBJECT

public:
    explicit MemberDialog(MemberManage * mm,QWidget *parent = nullptr);
    ~MemberDialog();
    void closeEvent(QCloseEvent * event);
    void showEvent(QShowEvent* event);
private slots:
    void on_tableWidget_itemSelectionChanged();
    void on_deleteButton_clicked();

    void on_editButton_clicked();

    void on_saveButton_clicked();

    void on_addButton_clicked();

    void on_tableWidget_itemPressed(QTableWidgetItem *item);
    void on_exitButton_clicked();

private:
    Ui::MemberDialog *ui;
    MemberManage * mm;
    std::set<int> changedSet;


signals:
    void saveMember();

};

#endif // MEMBERDIALOG_H
